package com.hrg.rds.biz.waybill.service.impl;

import com.hrg.rds.biz.waybill.domain.instance.AgvMsg;
import com.hrg.rds.biz.waybill.domain.instance.AgvMsgDto;
import com.hrg.rds.biz.waybill.mapper.AgvMsgMapper;
import com.hrg.rds.biz.waybill.service.AgvMsgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Slf4j
@Service
public class AgvMsgServiceImpl implements AgvMsgService {

    @Autowired
    private AgvMsgMapper agvMsgMapper;

    @Override
    public List<AgvMsg> selectList(AgvMsgDto agvMsgDto) {
        return agvMsgMapper.selectList(agvMsgDto);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void insert(AgvMsg agvMsg) {
        agvMsgMapper.insert(agvMsg);
    }
}
